package com.hqd.ch03.test.web.v33;


import com.hqd.ch03.v33.context.stereotype.Controller;
import com.hqd.ch03.v33.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
public class HelloController {

    @RequestMapping("/hello")
    public String sayHello(HttpServletRequest req, HttpServletResponse resp) {
        String key = "message";
        String message = (String) req.getAttribute(key);
        req.setAttribute(key, message + " V33 HandleMapping!");
        return "hello";
    }
}
